1. /* sdmmprdx.cpp by K.Tsuru */
  2. // function ID = 340 DRADIX, BRADIX
  3. /********************************************
  4. SDouble and SDecimal classes
  5. a member function
  6. It multiplies by the radix to the n-th power.
  7. *********************************************/
  8. #ifndef SN_H
  9. #include "sn.h"
  10. #endif
  11. SDouble& SDouble::MultPowRdx(int n){
  12. if(!n || !SNSign()) return *this; //does not use Sign()
  13. if(Type() == REAL){
  14. //cout << " n = " << n << endl;
  15. SetRdxExp(rdxExp + n);
  16. //cout << "after SetRdxExp() " << rdxExp + n <<endl;
  17. Reform(340);//In the fixed point mode the moving of figures is done.
  18. } else{ // Type() == BIN_DEC
  19. if((int)aTail - n < 0) SetError(OVERFLOW_ERR, "MultPowRdx", 340);
  20. ShiftArray(-n);//moving figures
  21. }
  22. return *this;
  23. }

sdmmprdx.cpp : last modifiled at 2017/08/12 10:37:20(763 bytes)
created at 2017/10/07 10:21:15
The creation time of this html file is 2017/10/07 10:30:03 (Sat Oct 07 10:30:03 2017).